<template>
  <div>
    <button @click="handleClick">X</button>
    控制弹窗显示与隐藏的值：{{ visible }}
  </div>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      required: true
    }
  },
  methods: {
    handleClick() {
      this.$emit('update:visible', false)
    }
  }
}
</script>

<style>

</style>